home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / sgway5.zip / STACGW5.BAT next >
DOS Batch File  |  1991-08-06  |  44KB  |  1,255 lines

  1. echo off 
  2. rem =========================================================================
  3. rem STACGW5.BAT - Version 1.00, Gateway MS-DOS 5.0 Upgrade Batch File
  4. rem =========================================================================
  5. rem Purpose:  To ease the upgrade to DOS 5.0 for users meeting the following
  6. rem    criteria: there is less than 2.8 MB of space available on the
  7. rem    uncompressed drive.
  8. rem 
  9. rem Assumptions: 
  10. rem    The batch file MUST be run from the Stacker directory on the 
  11. rem    Stacker volume.
  12. rem 
  13. rem Parameters (all required):
  14. rem 
  15. rem    %1 = on PASS 1: drive letter to install from (A, B, A:, or B:)
  16. rem    %2 = drive letter for Stacker volume with DOS directory (eg., C:)
  17. rem    %3 = DOS directory on Stacker volume (eg., \DOS)
  18. rem 
  19. rem Environment variables used:
  20. rem 
  21. rem   _b = drive letter of real boot drive (uncompressed), with ':' 
  22. rem          character appended
  23. rem   _d = user's DOS directory name; if there's no leading '\' on it,
  24. rem          one is prepended before the variable is used
  25. rem  _hd = hard drive letter for DOS directory (must be a Stacker volume)
  26. rem  _fd = floppy drive letter for drive DOS 5 is installed from 
  27. rem  _fs = floppy diskette size; _f=3 means 3.5", _f=5 means 5.25"
  28. rem
  29. rem Troubleshooting:
  30. rem
  31. rem The batch file creates a file called STACGW5.LOG in the root directory 
  32. rem of the uncompressed drive. This log file is eventually moved to the
  33. rem Stacker directory on the uncompressed drive. Echo statements are used 
  34. rem to append to the file so that tech support can know how far the 
  35. rem process got if it fails.
  36. rem 
  37. rem =========================================================================
  38. rem Flow of processing...
  39. rem 
  40. rem   Execute pass 2 if the batch file variable %5 is 2.
  41. rem   Execute pass 3 if the batch file variable %5 is 3.
  42. rem
  43. rem PASS 1:
  44. rem   Verify that there are three parameters.
  45. rem   Check for sufficient environment space.
  46. rem   Check for SATTRIB, SWAPMAP and DRVTYPE in Stacker directory.
  47. rem   Determine real boot drive using use SWAPMAP.
  48. rem   Verify the drive letter (%1).
  49. rem   Verify the DOS directory name specified (%2).
  50. rem   Verify that the drive for DOS directory is on a Stacker volume (%3).
  51. rem   Verify that VIDTYPE.EXE is in the Stacker directory.
  52. rem 
  53. rem   Display the welcome screen with user instructions.
  54. rem   Rename CONFIG.SYS and AUTOEXEC.BAT for later restoration.
  55. rem   Prompt for diskette containing EXPAND.EXE and copy it.
  56. rem   Prompt for distribution diskettes and expand files into DOS directory.
  57. rem   Update driver files in root, DOS, and Windows directories as needed.
  58. rem   Update COMMAND.COM on Stacker volume.
  59. rem   Prepare for PASS 2 by copying ourselves to the boot disk.
  60. rem   Transfer control to DISK 1 of Gateway DOS Upgrade Set.
  61. rem   Create correct DOSSHELL based on video type.
  62. rem   Instruct the user to reboot for PASS 2.
  63. rem 
  64. rem PASS 2:
  65. rem   SYS the uncompressed drive.
  66. rem   Copy COMMAND.COM to the DOS directory on the uncompressed drive.
  67. rem   Restore CONFIG.SYS to prepare for PASS 3. 
  68. rem   Instruct the user to reboot for PASS 3.
  69. rem
  70. rem PASS 3:
  71. rem   Update system files on the Stacker volume.
  72. rem   Restore AUTOEXEC.BAT on the uncompressed drive.
  73. rem   Copy the STACGW5.LOG file to the Stacker directory on the
  74. rem     uncompressed drive.
  75. rem   Cleanup and delete temporary files as much as possible.
  76. rem   Instruct the user to reboot and exit.      
  77. rem =========================================================================
  78.  
  79. rem if the fifth parameter of STACGW5.BAT is 2, it's time for PASS 2.
  80. if %5qq==2qq goto pass2
  81.  
  82. rem If the fifth parameter of STACGW5.BAT is 3, it's time for PASS 3. 
  83. if %5qq==3qq goto pass3
  84.  
  85. rem =========================================================================
  86. rem PASS 1 Process.
  87.  
  88. :pass1
  89. rem Verify that there are three parameters.
  90. if %1qq==qq goto noparms
  91. if %2qq==qq goto noparm2
  92. if %3qq==qq goto noparm3
  93.  
  94. rem Check for sufficient environment space.  This check will fail for one
  95. rem of 2 reasons: 1) not enough environment, and 2) DOS version prior to
  96. rem 3.1.  Those DOS versions don't handle environment vars in batch files.
  97. :chkenv
  98. set _b=1234567890123456789012345
  99. if %_b%==1234567890123456789012345 goto chkenv_e
  100. goto nospace
  101. :chkenv_e
  102. set _b=
  103.  
  104. rem Check to see that we're in the Stacker directory.  We need to be here
  105. rem so we can use the SATTRIB, SWAPMAP, and DRVTYPE commands later on.
  106. :ckstkr
  107. if not exist sattrib.com goto notstkr1
  108. if not exist swapmap.com goto notstkr1
  109. if not exist drvtype.exe goto notstkr1
  110.  
  111. :chkswap
  112. rem Find out what the real boot drive is.
  113. swapmap c:
  114. IF errorlevel 26  goto noboot
  115. IF errorlevel 25  goto bootZ
  116. IF errorlevel 24  goto bootY
  117. IF errorlevel 23  goto bootX
  118. IF errorlevel 22  goto bootW
  119. IF errorlevel 21  goto bootV
  120. IF errorlevel 20  goto bootU
  121. IF errorlevel 19  goto bootT
  122. IF errorlevel 18  goto bootS
  123. IF errorlevel 17  goto bootR
  124. IF errorlevel 16  goto bootQ
  125. IF errorlevel 15  goto bootP
  126. IF errorlevel 14  goto bootO
  127. IF errorlevel 13  goto bootN
  128. IF errorlevel 12  goto bootM
  129. IF errorlevel 11  goto bootL
  130. IF errorlevel 10  goto bootK
  131. IF errorlevel  9  goto bootJ
  132. IF errorlevel  8  goto bootI
  133. IF errorlevel  7  goto bootH
  134. IF errorlevel  6  goto bootG
  135. IF errorlevel  5  goto bootF
  136. IF errorlevel  4  goto bootE
  137. IF errorlevel  3  goto bootD
  138. IF errorlevel  2  goto bootC
  139. goto noboot
  140.  
  141. :bootC
  142. set _b=C:
  143. Goto bootdon
  144.  
  145. :bootD
  146. set _b=D:
  147. goto bootdon
  148.  
  149. :bootE
  150. set _b=E:
  151. goto bootdon
  152.  
  153. :bootF
  154. set _b=F:
  155. goto bootdon
  156.  
  157. :bootG
  158. set _b=G:
  159. goto bootdon
  160.  
  161. :bootH
  162. set _b=H:
  163. goto bootdon
  164.  
  165. :bootI
  166. set _b=I:
  167. goto bootdon
  168.  
  169. :bootJ
  170. set _b=J:
  171. goto bootdon
  172.  
  173. :bootK
  174. set _b=K:
  175. goto bootdon
  176.  
  177. :bootL
  178. set _b=L:
  179. goto bootdon
  180.  
  181. :bootM
  182. set _b=M:
  183. goto bootdon
  184.  
  185. :bootN
  186. set _b=N:
  187. goto bootdon
  188.  
  189. :bootO
  190. set _b=O:
  191. goto bootdon
  192.  
  193. :bootP
  194. set _b=P:
  195. goto bootdon
  196.  
  197. :bootQ
  198. set _b=Q:
  199. goto bootdon
  200.  
  201. :bootR
  202. set _b=rR:
  203. goto bootdon
  204.  
  205. :bootS
  206. set _b=S:
  207. goto bootdon
  208.  
  209. :bootT
  210. set _b=T:
  211. goto bootdon
  212.  
  213. :bootU
  214. set _b=U:
  215. goto bootdon
  216.  
  217. :bootV
  218. set _b=V:
  219. goto bootdon
  220.  
  221. :bootW
  222. set _b=W:
  223. goto bootdon
  224.  
  225. :bootX
  226. set _b=X:
  227. goto bootdon
  228.  
  229. :bootY
  230. set _b=Y:
  231. goto bootdon
  232.  
  233. :bootZ
  234. set _b=Z:
  235. :bootdon
  236. echo Boot drive is %_b% >> %_b%\stacgw5.log
  237.  
  238. rem Check for presence and validity of the drive letter parameter.
  239. :chkdrv
  240. if %1==a: goto setdrv
  241. if %1==A: goto setdrv
  242. if %1==b: goto setdrv
  243. if %1==B: goto setdrv
  244. if %1==a  goto setdrv
  245. if %1==A  goto setdrv
  246. if %1==b  goto setdrv
  247. if %1==B  goto setdrv
  248. goto nodrive
  249.  
  250. rem Set drive letter variable.
  251. :setdrv
  252. if %1==a: set _fd=A:
  253. if %1==A: set _fd=A:
  254. if %1==b: set _fd=B:
  255. if %1==B: set _fd=B:
  256. if %1==a  set _fd=A:
  257. if %1==A  set _fd=A:
  258. if %1==b  set _fd=B:
  259. if %1==B  set _fd=B:
  260.  
  261. rem Make sure the drive for the DOS directory is a Stacker volume.
  262. rem Append a ':' to it, if it helps.
  263. cls
  264. set _hd=%2
  265. set _d=%3
  266. drvtype %_hd%
  267. if errorlevel 3 goto notstkr2
  268. if errorlevel 2 goto chkdir
  269. goto notstkr2
  270.  
  271. :chkdir
  272. if exist %_hd%%_d%\chkdsk.com goto chkvidtyp
  273. if not exist %_hd%:%_d%\chkdsk.com goto direrr1
  274. set _hd=%_hd%:
  275.  
  276. :chkvidtyp
  277. if not exist %_hd%\stacker\vidtype.exe goto novid
  278.  
  279. rem We're done error checking, let's tell them why we're here.  This is
  280. rem the normal opening screen for the target audience.
  281. :welcome
  282. cls
  283. echo .
  284. echo .   Welcome to the Gateway MS-DOS 5.0 Upgrade for Stacker users.
  285. echo .   ============================================================
  286. echo .
  287. echo This process will allow you to upgrade your system to Gateway 
  288. echo MS-DOS 5.0. During this process you will be prompted to insert each 
  289. echo of your Gateway MS-DOS 5.0 Upgrade diskettes. All of the DOS command 
  290. echo files and drivers on your system will be updated.
  291. echo .
  292. echo This process will take approximately 20 minutes.
  293. echo .
  294. echo You will need at least 3 MB of disk space on your Stacker volume.
  295. echo .
  296. echo You will also need at least 650 KB of disk space on your uncompressed
  297. echo boot drive.
  298. echo .
  299. echo ********
  300. echo WARNING: IF YOU PERFORM THE GATEWAY MS-DOS 5.0 UPGRADE USING THIS 
  301. echo ******** PROCEDURE, YOU WILL NOT BE ABLE TO USE THE GATEWAY MS-DOS 5.0 
  302. echo          UNINSTALL FEATURE TO RETURN TO YOUR OLD DOS VERSION.
  303. echo .
  304. echo          IF YOU WISH TO EXIT, PRESS CTRL-C.
  305. echo . 
  306. pause
  307. dir %_b% /w
  308. echo                    --------------------
  309. echo                             ^
  310. echo                             :
  311. echo                             :
  312. echo If the number displayed above as "bytes free" is less than 650,000, 
  313. echo be sure to do the following:
  314. echo .
  315. echo   1. Press Ctrl-C to exit this process.
  316. echo   2. Make at least 650 KB available on drive %_b%.  You can do this by
  317. echo      deleting unnecessary files or backing up files to diskettes.
  318. echo   3. Re-run this batch file.
  319. echo .
  320. echo If the number displayed above as "bytes free" is greater than 3,000,000,
  321. echo you should not run this batch file as you already have enough available 
  322. echo disk space to install Gateway MS-DOS 5.0 using the SETUP program. 
  323. echo Type CTRL-C now if you need to exit this procedure.
  324. echo .
  325. echo If you wish to continue this procedure and there is sufficient space 
  326. echo available, you may continue this process.
  327. echo .
  328. pause
  329. cls
  330. echo .
  331. echo We will now display the amount of space available on your Stacker 
  332. echo volume.
  333. echo .
  334. echo If you wish to exit, press Ctrl-C.
  335. echo .
  336. pause
  337. dir %_hd%%_d% /w
  338. echo                    --------------------
  339. echo                             ^
  340. echo                             :
  341. echo                             :
  342. echo                             :
  343. echo .
  344. echo If the number displayed above as "bytes free" is less than 3,000,000,
  345. echo be sure to do the following:
  346. echo .
  347. echo   1. Press Ctrl-C to exit this process.
  348. echo .
  349. echo   2. Make at least 3 MB available on the Stacker volume containing the
  350. echo      %_hd%%_d% directory.  You can do this by deleting unnecessary files 
  351. echo      or by backing up files to diskettes.
  352. echo .
  353. echo   3. Re-run this batch file.
  354. echo .
  355. echo If there is sufficient space available, you may continue this process.
  356. echo .
  357. pause
  358.  
  359. rem At this point we're ready to get started with the process.
  360. echo STACGW5.BAT start. > %_b%\stacgw5.log
  361. rem Save config.sys and autoexec.bat for subsequent restoration.
  362. if exist %_b%\config.sys ren %_b%\config.sys config.$s$
  363. if exist %_b%\autoexec.bat ren %_b%\autoexec.bat autoexec.$s$
  364.  
  365. rem Get the disk with EXPAND.EXE on it.
  366. cls
  367. :gtexpdsk
  368. echo .
  369. echo If you are using 5.25" diskettes, insert DISK 5.
  370. echo .
  371. echo If you are using 3.5"  diskettes, insert DISK 3.
  372. pause
  373. if exist %_fd%expand.exe goto cpyexpnd
  374. cls
  375. echo Error: This is the wrong disk, try again...(press Ctrl-C to exit)
  376. echo.
  377. echo This batch file is designed to assist you during installation of
  378. echo the Gateway MS-DOS 5.0 Upgrade.  It does not support the Microsoft 
  379. echo MS-DOS 5 Upgrade or the IBM DOS 5.0 Upgrade.  If you need assistance 
  380. echo installing another manufacturer's DOS 5.0, please contact Stac 
  381. echo Technical Support.
  382. goto gtexpdsk
  383.  
  384. :cpyexpnd
  385. echo Copying expand.exe to %_hd%%_d%...
  386. copy %_fd%expand.exe expand.exe > nul
  387. echo .
  388.  
  389. echo Insert DISK 1 of your Gateway MS-DOS 5.0 in drive %_fd%. >> %_b%\stacgw5.log
  390. echo Insert DISK 1 of your Gateway MS-DOS 5.0 in drive %_fd%
  391. pause
  392.  
  393. rem Figure out which diskette format.
  394. rem _fs=3 means 3.5" diskettes; _fs=5 means 5.25" diskettes
  395. rem 
  396. set _fs=3
  397. if exist %_fd%display.sy_ goto endwhfmt
  398. set _fs=5
  399. :endwhfmt
  400.  
  401. rem Based on disk format, start prompting for the distribution diskettes.
  402. if %_fs%==3 goto getdsk31
  403. if %_fs%==5 goto getdsk51
  404. rem Copy files from 3.5" diskettes.
  405.  
  406. :getdsk31
  407. if exist %_fd%command.com goto copyd31
  408. cls
  409. echo Error: This doesn't look like DISK 1, please try again...
  410. echo (press Ctrl-C now if you need to exit)
  411. echo .
  412. echo This procedure is designed to install the Gateway version of MS-DOS 5.0
  413. echo You may be trying to install another manufacturer's version of DOS 5.0.
  414. echo Check to be sure you have the correct version of DOS 5.0 for your
  415. echo system.
  416. echo .
  417. echo Insert DISK 1 of your Gateway MS-DOS 5.0 in drive %_fd%. >> %_b%\stacgw5.log
  418. echo Insert DISK 1 of your Gateway MS-DOS 5.0 in drive %_fd%
  419. pause
  420. goto getdsk31
  421.  
  422. :copyd31
  423. echo Expanding contents of DISK 1 to %_hd%%_d%...
  424. echo .
  425. copy %_fd%autoexec.bat %_hd%%_d%\autoexec.bat > nul
  426. copy %_fd%command.com %_hd%%_d%\command.com > nul
  427. copy %_fd%country.sys %_hd%%_d%\country.sys > nul
  428. expand %_fd%ega.sy_ %_hd%%_d%\ega.sys
  429. copy %_fd%format.com %_hd%%_d%\format.com > nul
  430. copy %_fd%keyb.com %_hd%%_d%\keyb.com > nul
  431. copy %_fd%keyboard.sys %_hd%%_d%\keyboard.sys >nul
  432. copy %_fd%nlsfunc.exe %_hd%%_d%\nlsfunc.exe > nul
  433. copy %_fd%setup.exe %_hd%%_d%\setup.exe > nul
  434. copy %_fd%setup.ini %_hd%%_d%\setup.ini > nul
  435. copy %_fd%cv.com %_hd%%_d%\cv.com > nul
  436. expand %_fd%display.sy_ %_hd%%_d%\display.sys 
  437. expand %_fd%ega.cp_ %_hd%%_d%\ega.cpi
  438. expand %_fd%himem.sy_ %_hd%%_d%\himem.sys
  439. expand %_fd%mode.co_ %_hd%%_d%\mode.com
  440. expand %_fd%setver.ex_ %_hd%%_d%\setver.exe
  441. expand %_fd%ansi.sy_ %_hd%%_d%\ansi.sys
  442. expand %_fd%debug.ex_ %_hd%%_d%\debug.exe
  443. expand %_fd%edlin.ex_ %_hd%%_d%\edlin.exe
  444. expand %_fd%emm386.ex_ %_hd%%_d%\emm386.exe
  445. expand %_fd%fastopen.ex_ %_hd%%_d%\fastopen.exe
  446. copy %_fd%fdisk.exe %_hd%%_d%\fdisk.exe > nul
  447. expand %_fd%mem.ex_ %_hd%%_d%\mem.exe 
  448. expand %_fd%mirror.co_ %_hd%%_d%\mirror.com
  449. expand %_fd%ramdrive.sy_ %_hd%%_d%\ramdrive.sys
  450. expand %_fd%share.ex_ %_hd%%_d%\share.exe
  451. expand %_fd%smartdrv.sy_ %_hd%%_d%\smartdrv.sys
  452. expand %_fd%sys.co_ %_hd%%_d%\sys.com
  453. expand %_fd%undelete.ex_ %_hd%%_d%\undelete.exe
  454. copy %_fd%unformat.com %_hd%%_d%\unformat.com > nul
  455. expand %_fd%xcopy.ex_ %_hd%%_d%\xcopy.exe
  456.  
  457. :getdsk32
  458. echo Insert DISK 2 of your Gateway MS-DOS 5.0 in drive %_fd%. >> %_b%\stacgw5.log
  459. echo Insert DISK 2 of your Gateway MS-DOS 5.0 in drive %_fd%
  460. pause
  461. if exist %_fd%doskey.co_ goto copyd32
  462. cls
  463. echo Error: This doesn't look like DISK 2, please try again...
  464. echo (press Ctrl-C now if you need to exit)
  465. echo .
  466. goto getdsk32
  467.  
  468. :copyd32
  469. echo Expanding contents of DISK 2 to %_hd%%_d%...
  470. echo .
  471. expand %_fd%doskey.co_ %_hd%%_d%\doskey.com
  472. expand %_fd%cga.gr_ %_hd%%_d%\cga.grb
  473. expand %_fd%cga.in_ %_hd%%_d%\cga.ini
  474. expand %_fd%cga.vi_ %_hd%%_d%\cga.vid
  475. expand %_fd%dosshell.co_ %_hd%%_d%\dosshell.com
  476. expand %_fd%dosshell.ex_ %_hd%%_d%\dosshell.exe
  477. expand %_fd%dosswap.ex_ %_hd%%_d%\dosswap.exe
  478. expand %_fd%ega.gr_ %_hd%%_d%\ega.grb
  479. expand %_fd%ega.in_ %_hd%%_d%\ega.ini
  480. expand %_fd%ega.vi_ %_hd%%_d%\ega.vid
  481. expand %_fd%egamono.gr_ %_hd%%_d%\egamono.grb
  482. expand %_fd%herc.gr_ %_hd%%_d%\herc.grb
  483. expand %_fd%herc.vi_ %_hd%%_d%\herc.vid
  484. expand %_fd%mono.gr_ %_hd%%_d%\mono.grb
  485. expand %_fd%mono.in_ %_hd%%_d%\mono.ini
  486. copy %_fd%packing.lst %_hd%%_d%\packing.lst > nul
  487. expand %_fd%print.ex_ %_hd%%_d%\print.exe
  488. expand %_fd%vga.gr_ %_hd%%_d%\vga.grb
  489. expand %_fd%vga.vi_ %_hd%%_d%\vga.vid
  490. expand %_fd%vgamono.gr_ %_hd%%_d%\vgamono.grb
  491. copy %_fd%appnotes.txt %_hd%%_d%\appnotes.txt > nul
  492. expand %_fd%doshelp.hl_ %_hd%%_d%\doshelp.hlp
  493. expand %_fd%dosshell.hl_ %_hd%%_d%\dosshell.hlp
  494. expand %_fd%edit.hl_ %_hd%%_d%\edit.hlp
  495. expand %_fd%help.ex_ %_hd%%_d%\help.exe
  496. expand %_fd%recover.ex_ %_hd%%_d%\recover.exe
  497. expand %_fd%qbasic.hl_ %_hd%%_d%\qbasic.hlp
  498. copy %_fd%edit.com %_hd%%_d%\edit.com > nul
  499. expand %_fd%money.ba_ %_hd%%_d%\money.bas
  500. expand %_fd%msherc.co_ %_hd%%_d%\msherc.com
  501. expand %_fd%qbasic.ex_ %_hd%%_d%\qbasic.exe
  502.  
  503. :getdsk33
  504. echo Insert DISK 3 of your Gateway MS-DOS 5.0 in drive %_fd%. >> %_b%\stacgw5.log
  505. echo Insert DISK 3 of your Gateway MS-DOS 5.0 in drive %_fd%
  506. pause
  507. if exist %_fd%gorilla.ba_ goto copyd33
  508. cls
  509. echo Error: This doesn't look like DISK 3, please try again...
  510. echo (press Ctrl-C now if you need to exit)
  511. echo .
  512. goto getdsk33
  513.  
  514. :copyd33
  515. echo Expanding contents of DISK 3 to %_hd%%_d%...
  516. echo .
  517. expand %_fd%gorilla.ba_ %_hd%%_d%\gorilla.bas
  518. expand %_fd%4201.cp_ %_hd%%_d%\4201.cpi
  519. expand %_fd%4208.cp_ %_hd%%_d%\4208.cpi
  520. expand %_fd%5202.cp_ %_hd%%_d%\5202.cpi
  521. expand %_fd%append.ex_ %_hd%%_d%\append.exe
  522. expand %_fd%assign.co_ %_hd%%_d%\assign.com
  523. expand %_fd%attrib.ex_ %_hd%%_d%\attrib.exe
  524. expand %_fd%backup.ex_ %_hd%%_d%\backup.exe
  525. expand %_fd%chkdsk.ex_ %_hd%%_d%\chkdsk.exe
  526. expand %_fd%comp.ex_ %_hd%%_d%\comp.exe
  527. expand %_fd%diskcomp.co_ %_hd%%_d%\diskcomp.com
  528. expand %_fd%diskcopy.co_ %_hd%%_d%\diskcopy.com
  529. expand %_fd%driver.sy_ %_hd%%_d%\driver.sys
  530. expand %_fd%fc.ex_ %_hd%%_d%\fc.exe
  531. expand %_fd%find.ex_ %_hd%%_d%\find.exe
  532. expand %_fd%graftabl.co_ %_hd%%_d%\graftabl.com
  533. expand %_fd%graphics.co_ %_hd%%_d%\graphics.com
  534. expand %_fd%label.ex_ %_hd%%_d%\label.exe
  535. expand %_fd%more.co_ %_hd%%_d%\more.com
  536. expand %_fd%nibbles.ba_ %_hd%%_d%\nibbles.bas
  537. expand %_fd%remline.ba_ %_hd%%_d%\remline.bas
  538. expand %_fd%restore.ex_ %_hd%%_d%\restore.exe
  539. expand %_fd%sort.ex_ %_hd%%_d%\sort.exe
  540. expand %_fd%wina20.38_ %_hd%%_d%\wina20.386
  541. expand %_fd%exe2bin.ex_ %_hd%%_d%\exe2bin.exe
  542. expand %_fd%graphics.pr_ %_hd%%_d%\graphics.pro
  543. expand %_fd%join.ex_ %_hd%%_d%\join.exe
  544. expand %_fd%lcd.cp_ %_hd%%_d%\lcd.cpi
  545. expand %_fd%loadfix.co_ %_hd%%_d%\loadfix.com
  546. expand %_fd%printer.sy_ %_hd%%_d%\printer.sys
  547. copy %_fd%readme.txt %_hd%%_d%\readme.txt > nul
  548. expand %_fd%replace.ex_ %_hd%%_d%\replace.exe
  549. expand %_fd%subst.ex_ %_hd%%_d%\subst.exe
  550. expand %_fd%tree.co_ %_hd%%_d%\tree.com
  551. goto allok
  552.  
  553. rem Copy files from 5.25" diskettes.
  554. :getdsk51
  555. if exist %_fd%command.com goto copyd51
  556. cls
  557. echo Error: This doesn't look like DISK 1, please try again...
  558. echo (press Ctrl-C now if you need to exit)
  559. echo .
  560. echo This procedure is designed to install the Gateway version of MS-DOS 5.0
  561. echo You may be trying to install another manufacturer's version of DOS 5.0.
  562. echo Check to be sure you have the correct version of DOS 5.0 for your
  563. echo system.
  564. echo .
  565. echo Insert DISK 1 of your Gateway MS-DOS 5.0 in drive %_fd%. >> %_b%\stacgw5.log
  566. echo Insert DISK 1 of your Gateway MS-DOS 5.0 in drive %_fd%
  567. pause
  568. goto getdsk51
  569.  
  570. :copyd51
  571. echo Expanding contents of DISK 1 to %_hd%%_d%...
  572. echo .
  573. rem Upgrade 360KB Distribution Disk Layout
  574. copy %_fd%autoexec.bat %_hd%%_d%\autoexec.bat > nul
  575. copy %_fd%command.com %_hd%%_d%\command.com > nul
  576. copy %_fd%country.sys %_hd%%_d%\country.sys > nul
  577. expand %_fd%ega.sy_ %_hd%%_d%\ega.sys
  578. copy %_fd%format.com %_hd%%_d%\format.com > nul
  579. copy %_fd%keyb.com %_hd%%_d%\keyb.com > nul
  580. copy %_fd%keyboard.sys %_hd%%_d%\keyboard.sys >nul
  581. copy %_fd%nlsfunc.exe %_hd%%_d%\nlsfunc.exe > nul
  582. copy %_fd%setup.exe %_hd%%_d%\setup.exe > nul
  583. copy %_fd%setup.ini %_hd%%_d%\setup.ini > nul
  584. copy %_fd%cv.com %_hd%%_d%\cv.com > nul
  585.  
  586. :getdsk52
  587. echo Insert DISK 2 of your Gateway MS-DOS 5.0 in drive %_fd%. >> %_b%\stacgw5.log
  588. echo Insert DISK 2 of your Gateway MS-DOS 5.0 in drive %_fd%
  589. pause
  590. if exist %_fd%display.sy_ goto copyd52
  591. cls
  592. echo Error: This doesn't look like DISK 2, please try again...
  593. echo (press Ctrl-C now if you need to exit)
  594. echo .
  595. goto getdsk52
  596.  
  597. :copyd52
  598. echo Expanding contents of DISK 2 to %_hd%%_d%...
  599. echo .
  600. expand %_fd%display.sy_ %_hd%%_d%\display.sys 
  601. expand %_fd%ega.cp_ %_hd%%_d%\ega.cpi
  602. expand %_fd%himem.sy_ %_hd%%_d%\himem.sys
  603. expand %_fd%mode.co_ %_hd%%_d%\mode.com
  604. expand %_fd%setver.ex_ %_hd%%_d%\setver.exe
  605. expand %_fd%ansi.sy_ %_hd%%_d%\ansi.sys
  606. expand %_fd%debug.ex_ %_hd%%_d%\debug.exe
  607. expand %_fd%edlin.ex_ %_hd%%_d%\edlin.exe
  608. expand %_fd%emm386.ex_ %_hd%%_d%\emm386.exe
  609. expand %_fd%fastopen.ex_ %_hd%%_d%\fastopen.exe
  610. copy %_fd%fdisk.exe %_hd%%_d%\fdisk.exe > nul
  611. expand %_fd%mem.ex_ %_hd%%_d%\mem.exe
  612. expand %_fd%mirror.co_ %_hd%%_d%\mirror.com
  613. expand %_fd%ramdrive.sy_ %_hd%%_d%\ramdrive.sys
  614. expand %_fd%share.ex_ %_hd%%_d%\share.exe
  615. expand %_fd%smartdrv.sy_ %_hd%%_d%\smartdrv.sys
  616. expand %_fd%sys.co_ %_hd%%_d%\sys.com
  617. expand %_fd%undelete.ex_ %_hd%%_d%\undelete.exe
  618. copy %_fd%unformat.com %_hd%%_d%\unformat.com > nul
  619. expand %_fd%xcopy.ex_ %_hd%%_d%\xcopy.exe
  620.  
  621. :getdsk53
  622. echo Insert DISK 3 of your Gateway MS-DOS 5.0 in drive %_fd%. >> %_b%\stacgw5.log
  623. echo Insert DISK 3 of your Gateway MS-DOS 5.0 in drive %_fd%
  624. pause
  625. if exist %_fd%doskey.co_ goto copyd53
  626. cls
  627. echo Error: This doesn't look like DISK 3, please try again...
  628. echo (press Ctrl-C now if you need to exit)
  629. echo .
  630. goto getdsk53
  631.  
  632. :copyd53
  633. echo Expanding contents of DISK 3 to %_hd%%_d%...
  634. echo .
  635. expand %_fd%doskey.co_ %_hd%%_d%\doskey.com
  636. expand %_fd%cga.gr_ %_hd%%_d%\cga.grb
  637. expand %_fd%cga.in_ %_hd%%_d%\cga.ini
  638. expand %_fd%cga.vi_ %_hd%%_d%\cga.vid
  639. expand %_fd%dosshell.co_ %_hd%%_d%\dosshell.com
  640. expand %_fd%dosshell.ex_ %_hd%%_d%\dosshell.exe
  641. expand %_fd%dosswap.ex_ %_hd%%_d%\dosswap.exe
  642. expand %_fd%ega.gr_ %_hd%%_d%\ega.grb
  643. expand %_fd%ega.in_ %_hd%%_d%\ega.ini
  644. expand %_fd%ega.vi_ %_hd%%_d%\ega.vid
  645. expand %_fd%egamono.gr_ %_hd%%_d%\egamono.grb
  646. expand %_fd%herc.gr_ %_hd%%_d%\herc.grb
  647. expand %_fd%herc.vi_ %_hd%%_d%\herc.vid
  648. expand %_fd%mono.gr_ %_hd%%_d%\mono.grb
  649. expand %_fd%mono.in_ %_hd%%_d%\mono.ini
  650. copy %_fd%packing.lst %_hd%%_d%\packing.lst > nul
  651. expand %_fd%print.ex_ %_hd%%_d%\print.exe
  652. expand %_fd%vga.gr_ %_hd%%_d%\vga.grb
  653. expand %_fd%vga.vi_ %_hd%%_d%\vga.vid
  654. expand %_fd%vgamono.gr_ %_hd%%_d%\vgamono.grb
  655. copy %_fd%appnotes.txt %_hd%%_d%\appnotes.txt > nul
  656. expand %_fd%doshelp.hl_ %_hd%%_d%\doshelp.hlp
  657. expand %_fd%dosshell.hl_ %_hd%%_d%\dosshell.hlp
  658. expand %_fd%edit.hl_ %_hd%%_d%\edit.hlp
  659. expand %_fd%help.ex_ %_hd%%_d%\help.exe
  660. expand %_fd%recover.ex_ %_hd%%_d%\recover.exe
  661.  
  662. :getdsk54
  663. echo Insert DISK 4 of your Gateway MS-DOS 5.0 in drive %_fd%. >> %_b%\stacgw5.log
  664. echo Insert DISK 4 of your Gateway MS-DOS 5.0 in drive %_fd%
  665. pause
  666. if exist %_fd%qbasic.hl_ goto copyd54
  667. cls
  668. echo Error: This doesn't look like DISK 4, please try again...
  669. echo (press Ctrl-C now if you need to exit)
  670. echo .
  671. goto getdsk54
  672.  
  673. :copyd54
  674. echo Expanding contents of DISK 4 to %_hd%%_d%...
  675. echo .
  676. expand %_fd%qbasic.hl_ %_hd%%_d%\qbasic.hlp
  677. copy %_fd%edit.com %_hd%%_d%\edit.com > nul
  678. expand %_fd%money.ba_ %_hd%%_d%\money.bas
  679. expand %_fd%msherc.co_ %_hd%%_d%\msherc.com
  680. expand %_fd%qbasic.ex_ %_hd%%_d%\qbasic.exe
  681.  
  682. :getdsk55
  683. echo Insert DISK 5 of your Gateway MS-DOS 5.0 in drive %_fd%. >> %_b%\stacgw5.log
  684. echo Insert DISK 5 of your Gateway MS-DOS 5.0 in drive %_fd%
  685. pause
  686. if exist %_fd%gorilla.ba_ goto copyd55
  687. cls
  688. echo Error: This doesn't look like DISK 5, please try again...
  689. echo (press Ctrl-C now if you need to exit)
  690. echo .
  691. goto getdsk55
  692.  
  693. :copyd55
  694. echo Expanding contents of DISK 5 to %_hd%%_d%...
  695. echo .
  696. expand %_fd%gorilla.ba_ %_hd%%_d%\gorilla.bas
  697. expand %_fd%4201.cp_ %_hd%%_d%\4201.cpi
  698. expand %_fd%4208.cp_ %_hd%%_d%\4208.cpi
  699. expand %_fd%5202.cp_ %_hd%%_d%\5202.cpi
  700. expand %_fd%append.ex_ %_hd%%_d%\append.exe
  701. expand %_fd%assign.co_ %_hd%%_d%\assign.com
  702. expand %_fd%attrib.ex_ %_hd%%_d%\attrib.exe
  703. expand %_fd%backup.ex_ %_hd%%_d%\backup.exe
  704. expand %_fd%chkdsk.ex_ %_hd%%_d%\chkdsk.exe
  705. expand %_fd%comp.ex_ %_hd%%_d%\comp.exe
  706. expand %_fd%diskcomp.co_ %_hd%%_d%\diskcomp.com
  707. expand %_fd%diskcopy.co_ %_hd%%_d%\diskcopy.com
  708. expand %_fd%driver.sy_ %_hd%%_d%\driver.sys
  709. expand %_fd%fc.ex_ %_hd%%_d%\fc.exe
  710. expand %_fd%find.ex_ %_hd%%_d%\find.exe
  711. expand %_fd%graftabl.co_ %_hd%%_d%\graftabl.com
  712. expand %_fd%graphics.co_ %_hd%%_d%\graphics.com
  713. expand %_fd%label.ex_ %_hd%%_d%\label.exe
  714. expand %_fd%more.co_ %_hd%%_d%\more.com
  715. expand %_fd%nibbles.ba_ %_hd%%_d%\nibbles.bas
  716. expand %_fd%remline.ba_ %_hd%%_d%\remline.bas
  717. expand %_fd%restore.ex_ %_hd%%_d%\restore.exe
  718. expand %_fd%sort.ex_ %_hd%%_d%\sort.exe
  719. expand %_fd%wina20.38_ %_hd%%_d%\wina20.386
  720. expand %_fd%exe2bin.ex_ %_hd%%_d%\exe2bin.exe
  721. expand %_fd%graphics.pr_ %_hd%%_d%\graphics.pro
  722. expand %_fd%join.ex_ %_hd%%_d%\join.exe
  723. expand %_fd%lcd.cp_ %_hd%%_d%\lcd.cpi
  724. expand %_fd%loadfix.co_ %_hd%%_d%\loadfix.com
  725. expand %_fd%printer.sy_ %_hd%%_d%\printer.sys
  726. copy %_fd%readme.txt %_hd%%_d%\readme.txt > nul
  727. expand %_fd%replace.ex_ %_hd%%_d%\replace.exe
  728. expand %_fd%subst.ex_ %_hd%%_d%\subst.exe
  729. expand %_fd%tree.co_ %_hd%%_d%\tree.com
  730.  
  731. :allok
  732. copy %_hd%%_d%\edlin.exe  %_b%%_d% > nul
  733. copy %_hd%%_d%\sys.com    %_b% > nul
  734. copy %_hd%%_d%\chkdsk.exe %_b%%_d% > nul
  735. copy %_hd%%_d%\setver.exe %_b%%_d% > nul
  736. copy %_hd%%_d%\emm386.exe %_b%%_d% > nul
  737.  
  738. rem Update the following files on Drive C: and the uncompressed drive:
  739. rem 
  740. rem   HIMEM.SYS, SMARTDRV.SYS, RAMDRIVE.SYS, COUNTRY.SYS, ANSI.SYS
  741. rem   DRIVER.SYS
  742. rem   Also copy WINA20.386 to root directory Stacker and boot drives.
  743. rem
  744. rem   Copy them from the DOS directory to the appropriate destinations.
  745. rem
  746. echo Updating device drivers on the Stacker volume and boot drive...
  747.  
  748. :updsys
  749. rem Check for a Stacker directory on the user's boot drive.
  750. rem If it doesn't exist, create it.
  751. rem 
  752. copy %_hd%%_d%\command.com %_b%\stacker\command.com > nul
  753. if exist %_b%\stacker\command.com goto dofiles
  754. mkdir %_b%\stacker > nul
  755. copy %_hd%%_d%\command.com %_b%\stacker\command.com > nul
  756. if not exist %_b%\stacker\command.com goto nostroot
  757.  
  758. :dofiles
  759. del %_b%\stacker\command.com > nul
  760.  
  761. rem HIMEM.SYS - check root, DOS & Windows directories
  762. if exist \himem.sys copy %_hd%%_d%\himem.sys \himem.sys > nul
  763. if exist \windows\himem.sys copy %_hd%%_d%\himem.sys \windows\himem.sys > nul
  764. if exist %_b%\himem.sys copy %_hd%%_d%\himem.sys %_b%\himem.sys > nul
  765. copy %_hd%%_d%\himem.sys %_b%%_d%\himem.sys > nul
  766. if exist %_b%\windows\himem.sys copy %_hd%%_d%\himem.sys %_b%\windows\himem.sys > nul
  767. echo HIMEM.SYS updated. >> %_b%\stacgw5.log
  768.  
  769. rem SMARTDRV.SYS - check root, DOS & Windows directories
  770. if exist \smartdrv.sys copy %_hd%%_d%\smartdrv.sys \smartdrv.sys > nul
  771. if exist \windows\smartdrv.sys copy %_hd%%_d%\smartdrv.sys \windows\smartdrv.sys > nul
  772. if exist %_b%\smartdrv.sys copy %_hd%%_d%\smartdrv.sys %_b%\smartdrv.sys > nul
  773. if exist %_b%%_d%\smartdrv.sys copy %_hd%%_d%\smartdrv.sys %_b%%_d%\smartdrv.sys > nul
  774. if exist %_b%\windows\smartdrv.sys copy %_hd%%_d%\smartdrv.sys %_b%\windows\smartdrv.sys > nul
  775. echo SMARTDRV.SYS updated. >> %_b%\stacgw5.log
  776.  
  777. rem RAMDRIVE.SYS - check root, DOS & Windows directories
  778. if exist \ramdrive.sys copy %_hd%%_d%\ramdrive.sys \ramdrive.sys > nul
  779. if exist \windows\ramdrive.sys copy %_hd%%_d%\ramdrive.sys \windows\ramdrive.sys > nul
  780. if exist %_b%\ramdrive.sys copy %_hd%%_d%\ramdrive.sys %_b%\ramdrive.sys > nul
  781. if exist %_b%%_d%\ramdrive.sys copy %_hd%%_d%\ramdrive.sys %_b%%_d%\ramdrive.sys > nul
  782. if exist %_b%\windows\ramdrive.sys copy %_hd%%_d%\ramdrive.sys %_b%\windows\ramdrive.sys > nul
  783. echo RAMDRIVE.SYS updated. >> %_b%\stacgw5.log
  784.  
  785. rem COUNTRY.SYS - check root & DOS directories
  786. if exist \country.sys copy %_hd%%_d%\country.sys \country.sys > nul
  787. if exist %_b%\country.sys copy %_hd%%_d%\country.sys %_b%\country.sys > nul
  788. if exist %_b%%_d%\country.sys copy %_hd%%_d%\country.sys %_b%%_d%\country.sys > nul
  789. echo COUNTRY.SYS updated. >> %_b%\stacgw5.log
  790.  
  791. rem ANSI.SYS - check root & DOS directories
  792. if exist \ansi.sys copy %_hd%%_d%\ansi.sys \ansi.sys > nul
  793. if exist %_b%\ansi.sys copy %_hd%%_d%\ansi.sys %_b%\ansi.sys > nul
  794. if exist %_b%%_d%\ansi.sys copy %_hd%%_d%\ansi.sys %_b%%_d%\ansi.sys > nul
  795. echo ANSI.SYS updated. >> %_b%\stacgw5.log
  796.  
  797. rem DRIVER.SYS - check root & DOS directories
  798. if exist \driver.sys copy %_hd%%_d%\driver.sys \driver.sys > nul
  799. if exist %_b%\driver.sys copy %_hd%%_d%\driver.sys %_b%\driver.sys > nul
  800. if exist %_b%%_d%\driver.sys copy %_hd%%_d%\driver.sys %_b%%_d%\driver.sys > nul
  801. echo DRIVER.SYS updated. >> %_b%\stacgw5.log
  802.  
  803. rem WINA20.386 - copy to root directory of Stacker and boot drives
  804. copy %_hd%%_d%\wina20.386 \wina20.386 > nul
  805. copy %_hd%%_d%\wina20.386 %_b%\wina20.386 > nul
  806. echo WINA20 copied to root of Stacker and boot drives. >> %_b%\stacgw5.log
  807.  
  808. rem Update COMMAND.COM in the root of the Stacker volume (the current drive).
  809. :upcmdcom
  810. echo Updating COMMAND.COM on the Stacker volume ...
  811. if exist \command.com copy %_hd%%_d%\command.com \command.com > nul
  812. echo COMMAND.COM updated on Stacker volume. >> %_b%\stacgw5.log
  813.  
  814. rem Determine video type and install appropriate DOSSHELL files.
  815. vidtype
  816. if errorlevel  7 goto MCA
  817. if errorlevel  6 goto HERC
  818. if errorlevel  5 goto VGAMONO
  819. if errorlevel  4 goto VGA
  820. if errorlevel  3 goto EGAMONO
  821. if errorlevel  2 goto EGA
  822. if errorlevel  1 goto CGA
  823.  
  824. :MONO
  825. echo MONO video. >> %_b%\stacgw5.log
  826. echo DOSSHELL set up for MONO.
  827. copy %_hd%%_d%\mono.ini %_hd%%_d%\dosshell.ini > nul 
  828. copy %_hd%%_d%\mono.grb %_hd%%_d%\dosshell.grb > nul
  829. goto ENDVID
  830.  
  831. :CGA
  832. echo CGA video. >> %_b%\stacgw5.log
  833. echo DOSSHELL set up for CGA.
  834. copy %_hd%%_d%\cga.vid %_hd%%_d%\dosshell.vid > nul
  835. copy %_hd%%_d%\cga.ini %_hd%%_d%\dosshell.ini > nul
  836. copy %_hd%%_d%\cga.grb %_hd%%_d%\dosshell.grb > nul
  837. goto ENDVID
  838.  
  839. :EGA
  840. echo EGA video. >> %_b%\stacgw5.log
  841. echo DOSSHELL set up for EGA.
  842. copy %_hd%%_d%\ega.vid %_hd%%_d%\dosshell.vid > nul
  843. copy %_hd%%_d%\ega.ini %_hd%%_d%\dosshell.ini > nul
  844. copy %_hd%%_d%\ega.grb %_hd%%_d%\dosshell.grb > nul
  845. goto ENDVID
  846.  
  847. :EGAMONO
  848. echo EGAMONO video. >> %_b%\stacgw5.log
  849. echo DOSSHELL set up for EGAMONO.
  850. copy %_hd%%_d%\ega.vid %_hd%%_d%\dosshell.vid > nul
  851. copy %_hd%%_d%\mono.ini %_hd%%_d%\dosshell.ini > nul
  852. copy %_hd%%_d%\egamono.grb %_hd%%_d%\dosshell.grb > nul
  853. goto ENDVID
  854.  
  855. :VGA
  856. echo VGA video. >> %_b%\stacgw5.log
  857. echo DOSSHELL set up for VGA.
  858. copy %_hd%%_d%\vga.vid %_hd%%_d%\dosshell.vid > nul
  859. copy %_hd%%_d%\ega.ini %_hd%%_d%\dosshell.ini > nul
  860. copy %_hd%%_d%\vga.grb %_hd%%_d%\dosshell.grb > nul
  861. goto ENDVID
  862.  
  863. :VGAMONO
  864. echo VGAMONO video. >> %_b%\stacgw5.log
  865. echo DOSSHELL set up for VGAMONO.
  866. copy %_hd%%_d%\vga.vid %_hd%%_d%\dosshell.vid > nul
  867. copy %_hd%%_d%\mono.ini %_hd%%_d%\dosshell.ini > nul
  868. copy %_hd%%_d%\vgamono.grb %_hd%%_d%\dosshell.grb > nul
  869. goto ENDVID
  870.  
  871. :HERC
  872. echo HERC video. >> %_b%\stacgw5.log
  873. echo DOSSHELL set up for HERC.
  874. copy %_hd%%_d%\herc.vid %_hd%%_d%\dosshell.vid > nul
  875. copy %_hd%%_d%\mono.ini %_hd%%_d%\dosshell.ini > nul
  876. copy %_hd%%_d%\herc.grb %_hd%%_d%\dosshell.grb > nul
  877. goto ENDVID
  878.  
  879. :MCA
  880. echo MCA video. >> %_b%\stacgw5.log
  881. echo DOSSHELL set up for MCA.
  882. copy %_hd%%_d%\cga.vid %_hd%%_d%\dosshell.vid > nul
  883. copy %_hd%%_d%\cga.ini %_hd%%_d%\dosshell.ini > nul
  884. copy %_hd%%_d%\vga.grb %_hd%%_d%\dosshell.grb > nul
  885. :ENDVID
  886.  
  887. rem Instruct the user to reboot the system in order to SYS the uncompressed 
  888. rem boot drive
  889. echo .
  890. echo The DOS 5.0 files have been copied successfully.
  891. echo .
  892. echo You will now be prompted to reboot the system using Disk 1 of
  893. echo Gateway MS-DOS 5.0. This will install the remaining files needed to
  894. echo complete your upgrade to Gateway MS-DOS 5.0. Note that this process 
  895. echo will only transfer the system files to your boot drive since we've 
  896. echo already copied the files from the Gateway MS-DOS 5.0 diskettes.
  897. pause 
  898. cls
  899. echo When Disk 1 of Gateway MS-DOS boots the system, you will receive a
  900. echo message which indicates that the SETUP program has detected 
  901. echo that there is not enough free disk space to install MS-DOS 5.0 on 
  902. echo your boot drive. You should then press F3, then Y, to exit the SETUP 
  903. echo program and return to the DOS prompt. At that point, type the following 
  904. echo to continue the installation process:
  905. echo .
  906. echo                            C:STAC5
  907. echo .
  908. echo   **************************************************************
  909. echo   *   WRITE THIS INSTRUCTION DOWN. YOU MUST RUN THIS PROGRAM   *
  910. echo   *            TO CONTINUE THE INSTALLATION PROCESS.           *
  911. echo   **************************************************************
  912. echo .
  913. pause
  914.  
  915. :getdsk1
  916. echo Insert DISK 1 of your Gateway MS-DOS 5.0 in drive %_fd%. >> %_b%\stacgw5.log
  917. echo Insert DISK 1 of your Gateway MS-DOS 5.0 in drive %_fd%
  918. pause
  919. if exist %_fd%command.com goto sysfiles
  920. cls
  921. echo Error: This doesn't look like DISK 1, please try again...
  922. echo (press Ctrl-C if you need to exit)
  923. echo .
  924. goto getdsk1
  925.  
  926. :sysfiles
  927. echo Copy STACGW5.BAT to root dir of boot drive for PASS 2. >> %_b%\stacgw5.log
  928. if exist %_b%\stacgw5.bat del %_b%\stacgw5.bat
  929. copy stacgw5.bat %_b%\ > nul
  930.  
  931. rem Create a batch file for use in PASS 2.
  932. echo echo off 
  933. echo C: > %_b%\STAC5.BAT
  934. echo STACGW5 %_fd% %_hd% %_d% %_b% 2 >> %_b%\STAC5.BAT
  935. echo . >> %_b%\STAC5.BAT
  936. echo Creating %_B%\STAC5.BAT = STACGW5 %_fd% %_hd% %_d% %_b% 2 >> %_b%\stacgw5.log
  937.  
  938. rem Create another batch file for use in PASS 3.
  939. if exist %_b%\autoexec.bat del %_b%\autoexec.bat
  940. echo cd\stacker > %_b%\autoexec.bat
  941. echo STACGW5 %_fd% %_hd% %_d% %_b% 3 >> %_b%\autoexec.bat
  942. echo . >> %_b%\autoexec.bat
  943. echo Creating %_b%\AUTOEXEC.BAT = STACGW5 %_fd% %_hd% %_d% %_b% 3 >> %_b%\stacgw5.log
  944. cls
  945. echo      *************************************************************
  946. echo      *             PRESS CTRL+ALT+DEL NOW TO REBOOT              *
  947. echo      *               YOUR SYSTEM FROM DOS DISK 1                 *
  948. echo      *************************************************************
  949. echo      *                   DON'T FORGET TO TYPE                    *
  950. echo      *                         C:STAC5                           *
  951. echo      *       AT THE A PROMPT AFTER EXITING THE SETUP PROGRAM     *
  952. echo      *************************************************************
  953. echo PASS 1 completed. >> %_b%\stacgw5.log
  954. echo . >> %_b%\stacgw5.log
  955. goto alldone
  956.  
  957. rem ========================================================================
  958. rem PASS 2 Process.
  959.  
  960. :pass2
  961. echo Begin PASS 2. >> c:\stacgw5.log
  962. set _fd=%1
  963. set _hd=%2
  964. set _d=%3
  965. set _b=%4
  966. cls
  967.  
  968. :getadd1
  969. echo Please make sure DISK 1 of your Gateway MS-DOS 5.0 is in drive %_fd% >> c:\stacgw5.log
  970. echo Please make sure DISK 1 of your Gateway MS-DOS 5.0 is in drive %_fd%
  971. pause
  972. if exist %_fd%command.com goto add1ok
  973. cls
  974. echo Error: This doesn't look like DISK 1, please try again...
  975. echo (press Ctrl-C if you need to exit)
  976. echo .
  977. goto getadd1
  978.  
  979. :add1ok
  980. ren c:\command.com command.stc
  981. c:\sys %_fd% c:
  982. if not exist c:\command.com goto sysfail
  983. del c:\command.stc > nul
  984. copy c:\command.com c:%_d% > nul
  985. echo System Transferred >> c:\stacgw5.log
  986. echo Please remove DISK 1 of your Gateway MS-DOS 5.0 from drive %_fd% >> c:\stacgw5.log
  987. echo Please remove DISK 1 of your Gateway MS-DOS 5.0 from drive %_fd%
  988. pause
  989.  
  990. rem Instruct the user to reboot the system in order to copy the system
  991. rem files to the Stacker volume.
  992. cls
  993. echo You will now be prompted to reboot the system from the hard disk.
  994. echo This final procedure will complete your upgrade to Gateway MS-DOS 5.0. 
  995. echo .
  996. pause
  997.  
  998. rem Rename config.sys so Stacker volume can be mounted for PASS 3.
  999. ren c:\config.$s$ config.sys
  1000. echo CONFIG.SYS restored on boot drive %_b% for PASS 3. >> c:\stacgw5.log
  1001. echo PASS 2 completed. >> c:\stacgw5.log
  1002. echo . >> c:\stacgw5.log
  1003. cls
  1004. echo      *************************************************************
  1005. echo      *               PLEASE REMOVE THE DISKETTE AND              *
  1006. echo      *          PRESS CTRL+ALT+DEL TO REBOOT YOUR SYSTEM         *
  1007. echo      *                     FROM THE HARD DISK                    *
  1008. echo      *************************************************************
  1009. goto alldone
  1010.  
  1011. rem =========================================================================
  1012. rem PASS 3 Process.
  1013.  
  1014. :pass3
  1015. set _fd=%1
  1016. set _hd=%2
  1017. set _d=%3
  1018. set _b=%4
  1019. echo Begin PASS 3. >> %_b%\stacgw5.log
  1020.  
  1021. path %_hd%\stacker
  1022. rem Update DOS hidden files on Stacker volume 
  1023. rem Handle both MS-DOS and IBM versions.
  1024. if exist %_hd%\msdos.sys goto st_doms
  1025. if exist %_hd%\ibmdos.com goto st_doibm
  1026. goto st_put
  1027.  
  1028. :st_doibm
  1029. echo IBM System Files found on Stacker volume. >> %_b%\stacgw5.log
  1030. rem Unhide and delete IBM DOS files on Stacker volume.
  1031. sattrib -h -r -s %_hd%\ibmbio.com
  1032. sattrib -h -r -s %_hd%\ibmdos.com
  1033. del %_hd%\ibmbio.com > nul
  1034. del %_hd%\ibmdos.com > nul
  1035. echo IBM System Files deleted on Stacker volume. >> %_b%\stacgw5.log
  1036. goto st_put
  1037.  
  1038. :st_doms
  1039. echo MS-DOS System Files found on Stacker volume. >> %_b%\stacgw5.log
  1040. rem Unhide and delete MS-DOS files on Stacker volume.
  1041. sattrib -h -r -s %_hd%\io.sys
  1042. sattrib -h -r -s %_hd%\msdos.sys
  1043. del %_hd%\io.sys > nul
  1044. del %_hd%\msdos.sys > nul
  1045. echo MS-DOS System Files deleted on Stacker volume. >> %_b%\stacgw5.log
  1046.  
  1047. :st_put
  1048. sattrib -h -r -s %_b%\io.sys
  1049. sattrib -h -r -s %_b%\msdos.sys
  1050. echo System files on uncompressed boot drive unhidden. >> %_b%\stacgw5.log
  1051. copy %_b%\io.sys %_hd%\io.sys > nul
  1052. copy %_b%\msdos.sys %_hd%\msdos.sys > nul
  1053. echo System files copied to Stacker volume. >> %_b%\stacgw5.log
  1054.  
  1055. rem Hide system files on Stacker volume and uncompressed boot drive.
  1056. sattrib +h +r +s %_hd%\io.sys
  1057. sattrib +h +r +s %_hd%\msdos.sys
  1058. sattrib +h +r +s %_b%\io.sys
  1059. sattrib +h +r +s %_b%\msdos.sys
  1060. echo System files on Stacker volume and boot drive hidden. >> %_b%\stacgw5.log
  1061.  
  1062. rem Cleanup and exit.
  1063. del %_b%\autoexec.bat
  1064. ren %_b%\autoexec.$s$ autoexec.bat
  1065. echo AUTOEXEC.BAT restored on boot drive %_b%. >> %_b%\stacgw5.log
  1066. copy %_b%\stacgw5.log %_b%\stacker > nul
  1067. del %_b%\stacgw5.log > nul
  1068. del %_b%\sys.com
  1069. del %_b%\stac5.bat
  1070. del %_b%\stacgw5.bat
  1071. echo PASS 3 completed. >> %_b%\stacker\stacgw5.log
  1072. echo STACGW5.BAT complete. >> %_b%\stacker\stacgw5.log
  1073.  
  1074. cls
  1075. echo Gateway MS-DOS 5.0 files copied successfully.
  1076. echo .
  1077. rem Instruct the user to reboot.
  1078. echo .
  1079. echo Your Gateway MS-DOS 5.0 Upgrade is now complete.
  1080. echo .
  1081. echo Your CONFIG.SYS and AUTOEXEC.BAT files are the same as when you started
  1082. echo this process. You will need to modify them if you wish to take advantage
  1083. echo of the exciting new features offered in Gateway DOS 5.0. You can find 
  1084. echo some hints on this by referring to the "Getting Started - Upgrade" 
  1085. echo booklet which came with your upgrade package. Be sure you use the 
  1086. echo correct path names when adding any new commands to your CONFIG.SYS file. 
  1087. echo .
  1088. echo      *************************************************************
  1089. echo      *        PRESS CTRL+ALT+DEL NOW TO REBOOT YOUR SYSTEM       *
  1090. echo      *                                                           *
  1091. echo      *               THANK YOU FOR CHOOSING STACKER              *
  1092. echo      *************************************************************
  1093. goto alldone
  1094.  
  1095. rem =========================================================================
  1096. rem Error Displays - All errors which exit after display are here.
  1097. rem =========================================================================
  1098.  
  1099. :novid
  1100. cls
  1101. echo ERROR: We could not find the program VIDTYPE.EXE in the STACKER
  1102. echo        directory. Make sure both STACGW5.BAT and VIDTYPE.EXE
  1103. echo        are present in your STACKER directory on the Stacker volume,
  1104. echo        then restart the batch file.
  1105. goto alldone
  1106.  
  1107. :noparm2
  1108. :noparm3
  1109. cls
  1110. echo ERROR: STACGW5 requires three command-line parameters.
  1111. echo .
  1112. goto errexit
  1113.  
  1114. :nospace
  1115. cls
  1116. echo ERROR: STACGW5.BAT cannot run.  There are two possible reasons for this.
  1117. echo .
  1118. echo     1. There is not enough DOS environment space available.
  1119. echo        The update process requires very little space, however
  1120. echo        there is not enough available.  Please delete one or 
  1121. echo        more of your environment variables and run STACGW5 again.
  1122. echo .
  1123. echo                              or
  1124. echo     2. You are running a version of DOS prior to DOS 3.1.  This
  1125. echo        batch file uses features available in DOS 3.1 and later.
  1126. echo .
  1127. echo        You are running the following DOS version:
  1128. echo .
  1129. ver
  1130. echo .
  1131. goto alldone
  1132.  
  1133. :notstkr1
  1134. cls
  1135. echo ERROR: This batch file must be run from your compressed drive, with
  1136. echo        the Stacker directory as your current directory.  We're looking
  1137. echo        for the SATTRIB, SWAPMAP, and DRVTYPE Stacker utilities to
  1138. echo        verify this.  So, if you've deleted SATTRIB.COM, SWAPMAP.COM,
  1139. echo        or DRVTYPE.EXE from your Stacker directory, you must copy from
  1140. echo        the Stacker diskette to your Stacker directory before you can
  1141. echo        complete this process.
  1142. echo .
  1143. echo Please copy this batch file, STACGW5.BAT, to your STACKER directory.  
  1144. echo Make the Stacker directory on your compressed drive the current 
  1145. echo directory and run this batch file, STACGW5.
  1146. echo .
  1147. echo For example, if drive C: is a compressed drive, your Stacker
  1148. echo directory is named STACKER, the DOS directory is named DOS, and 
  1149. echo you will be installing from drive A:, type the following commands:
  1150. echo . 
  1151. echo                 COPY A:STACGW5.BAT C:\STACKER 
  1152. echo                 C:
  1153. echo                 CD \STACKER
  1154. echo                 STACGW5  A:  C:  \DOS
  1155. echo . 
  1156. goto alldone
  1157.  
  1158. :notstkr2
  1159. cls
  1160. echo ERROR: The drive letter you have specified for your DOS directory,
  1161. echo        %_hd%, is not a Stacker volume.
  1162. echo .
  1163. goto errexit
  1164.  
  1165. :noboot
  1166. echo ERROR: Unable to determine the boot drive.  
  1167. echo .
  1168. echo        Please contact STAC Technical Support for assistance.
  1169. goto alldone
  1170.  
  1171. :nodrive
  1172. cls
  1173. echo ERROR: You must provide the drive letter of the diskette drive
  1174. echo        that you will be installing your Gateway MS-DOS 5.0 Upgrade 
  1175. echo        from. The drive letter must be A: or B:.
  1176. echo .
  1177. goto errexit
  1178.  
  1179. :direrr1
  1180. cls
  1181. echo ERROR: Unable to verify the DOS directory, %_d%.  We're looking for
  1182. echo        the CHKDSK command file to verify this.
  1183. echo .
  1184. goto errexit
  1185.  
  1186. :direrr2
  1187. cls
  1188. echo ERROR: Drive C: is not a Stacker volume.
  1189. echo .
  1190. goto errexit
  1191.  
  1192. :nodosdir
  1193. cls
  1194. echo ERROR: Unable to copy files to the DOS directory, named %_hd%%_d%.  
  1195. echo        Your disk may be full.  You must have at least 3 MB available 
  1196. echo        on the drive containing the DOS directory.
  1197. echo .
  1198. echo Please make more space available and run STACGW5.BAT from the Stacker
  1199. echo again.  For example, if your are installing from drive A: and the DOS 
  1200. echo on a Stacker volume, drive C:, is called DOS and is on drive, type the
  1201. echo following:
  1202. echo .
  1203. echo                      STACGW5  A:  C:  \DOS
  1204. echo .
  1205. goto alldone
  1206.  
  1207. :nostroot
  1208. rem If this doesn't work, we can't operate.
  1209. cls
  1210. echo ERROR: Unable to locate or create Stacker directory on your boot 
  1211. echo        drive, drive %_b%.
  1212. echo .
  1213. echo Please make sure that a directory named STACKER exists on your boot
  1214. echo drive.
  1215. goto alldone
  1216.  
  1217. :errexit
  1218. :noparms
  1219. echo Run STACGW5.BAT from your Stacker directory on your Stacker volume
  1220. echo with the following parameters:
  1221. echo .
  1222. echo                     STACGW5  d1:  d2:  dosdir 
  1223. echo .
  1224. echo     d1:  the drive letter of the diskette drive you'll be installing
  1225. echo          your Gateway MS-DOS 5.0 Upgrade from. This must be A: or B:.
  1226. echo .
  1227. echo     d2:  the drive letter containing the DOS directory. This drive
  1228. echo          MUST be a Stacker volume.
  1229. echo .
  1230. echo  dosdir  the name of the DOS directory on your Stacker volume,
  1231. echo          (for example, \DOS).
  1232. echo .
  1233. echo For example, if you're installing Gateway MS-DOS 5.0 from drive A: 
  1234. echo and the DOS directory on drive C:, a Stacker volume, is called DOS, 
  1235. echo type the following:
  1236. echo .
  1237. echo                    STACGW5  A:  C:  \DOS
  1238. echo .
  1239. goto alldone
  1240.  
  1241. :sysfail
  1242. echo Error: We were not able to copy the system files to your C: drive 
  1243. echo        successfully. 
  1244. echo .
  1245. echo        Please contact STAC Technical Support for assistance. 
  1246. ren c:\command.stc command.com
  1247.  
  1248. :alldone
  1249. rem Be sure to keep the environment clean on exit.
  1250. set _b=
  1251. set _d=
  1252. set _fd=
  1253. set _fs=
  1254. set _h=
  1255.